﻿using System;
using System.ComponentModel;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;

using KingsSharp.Core.Data;

namespace CRM.Admin.Contracts.Model.Sys
{
    public class DictionaryType:EntityBase<Guid>
    {
        /// <summary>
        /// 字典类别
        /// </summary>
        [StringLength(50)]
        public string Name { get; set; }

        /// <summary>
        /// 类别描述
        /// </summary>
        [StringLength(300)]
        public string Description { get; set; }

        /// <summary>
        /// 类别编码
        /// </summary>
        public string Code { get; set; }

        /// <summary>
        /// 类别排序
        /// </summary>
        public int Order { get; set; }

        /// <summary>
        /// 父类别
        /// </summary>
        public virtual DictionaryType Parent { get; set; }

        /// <summary>
        /// 类别字典集合
        /// </summary>
        public virtual ICollection<Dictionary> Dictionarys { get; set; }

        /// <summary>
        /// 下级目录集合
        /// </summary>
        public virtual ICollection<DictionaryType> DictionaryTypes { get; set; }
    }
}
